package edu.caltech.cs.techerlink;

import com.google.appengine.api.users.User;

import java.util.List;
import javax.persistence.Id;

public class Student {
	@Id private Long id;
	private User google_user;
	private String nickname;
	private List<Course> courses;
	private int isTA;
//	private List<Course> TAfor;

	public Student() {
		// Empty constructor needed for GWT serialization and Objectify
	}

	public Student(User google_user, String name, int isTA) {
		this.google_user = google_user;
		this.nickname = name;
		this.isTA = isTA;
	}

	public Long getId() {
		return id;
	}

	public User getUser() {
		return google_user;
	}

	public String getNickname() {
		return nickname;
	}
	
	public List<Course> getCourses() {
		return courses;
	}

	public int getIsTA() {
		return isTA;
	}
	
//    public List<Course> getTAfor() {
//    	return TAfor;
//    }

    public void changeNickname(String newName) {
        nickname = newName;
    }
    
    public void addCourse(Course course) {
        courses.add(course);
    }

    public void delCourse(Course course) {
    	courses.remove(course);
    }
    
//    public void addTACourse(Course newTACourse) {
//    	TAfor.add(newTACourse);
//    }
    
//    public void delTACourse(Course byebyeTACourse) {
//    	TAfor.remove(byebyeTACourse);
//    }
}
